<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>部门列表</title>
</head>
<body>

<div align="center">
    <h1>部门列表</h1>
    <hr>
    <div><a href="/test_orm_old/add_dep_old/">增加一条记录</a></div>
    <table border="1">
        <thead>
        <tr>
            <td>部门名称</td>
            <td>备注说明</td>
            <td colspan="2">操作</td>
        </tr>
        </thead>
        <tbody>
        {% for dep in dep_list %} <!--#dep_list即为视图函数list_dep中render传入参数//-->
        <tr>
            <td>{{ dep.dep_name }}</td>
            <td>{{ dep.dep_script }}</td>
            <td><a href="/test_orm_old/del_dep_old/{{ dep.id }}/">删除</a></td>
            <td><a href="/test_orm_old/edit_dep_old/{{ dep.id }}/">修改</a></td>
        </tr>
        {% empty %}
           <tr>
            <td colspan="4">无相关记录！</td>

        </tr>
        {% endfor %}
        </tbody>
    </table>

</div>
</body>
</html>
